package com.erp.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;
import java.io.Serializable;
import java.time.LocalDateTime;


/**
 * 应付账实体
 */

@Data
@TableName(value = "t_payable")
public class Payable implements Serializable {

    private Long id;

    //单据详情
    private String information;

    //供应商名称
    private String company;

    //来源单据
    private String contract;

    //应付账金额
    private Long money;

    //对应总账id
    @TableField(value = "ledgerId")
    private Long ledgerId = 2L;

    //制单日期
    @TableField(value = "createDateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    //应付日期
    @TableField(value = "endDateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endDateTime;

    //付款计划 0未付款 1已付款
    private Integer status;

}
